<%-- 
    Document   : questionedit
    Created on : 2012-3-17, 14:37:57
    Author     : wl
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib  prefix="s"  uri="/struts-tags"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>编辑主观题</title>
        <link href="css/global.css" rel="stylesheet" type="text/css">
        <link href="css/form.css" rel="stylesheet" type="text/css">
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript" src="js/jquery.validate.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $('#signup').validate({
                    rules: {
                        chapter: {
                            required: true,
                            digits:true
                        }
                    }, //end rules
                    messages: {
                        chapter: {
                            required: '请输入章节',
                            digits: "请输入一个整数"
                        }
                    }
                }); // end validate
            }); // end ready()
        </script>
    </head>
    <body>
        <div id="contentWrap">
            <div id="main">
                <h2>编辑主观题</h2>
                <s:form action="questionedit" method="post" name="signup" id="signup">
                    <s:hidden name="id" value="%{question.id}"></s:hidden>
                    <div>
                        <label  class="label">课程 </label>
                        <s:textfield name="subject"   value="%{question.subject}"></s:textfield>
                    </div>
                    <div>
                        <label  class="label">章节 </label>
                        <s:textfield name="chapter"  value="%{question.chapter}"></s:textfield>
                    </div>
                    <div>
                        <label  class="label">章节信息 </label>
                        <s:textfield name="chapterinfo"  value="%{question.chapterinfo}"></s:textfield>
                    </div>
                    <div>
                        <label  class="label">题型</label>
                        <s:select name="type" label="题型" list="{'简答题','论述题','计算题','应用题'}" value="%{question.type}"></s:select>
                    </div>
                    <div>
                        <label  class="label">难度 </label>
                        <s:select name="level" label="难度" list="{'容易','中等','偏难','难'}" value="%{question.level}"></s:select>
                    </div>
                    <div>
                        <label  class="label">题目内容 </label>
                        <s:textarea name="name" label="题目内容" cols="40" rows="5" value="%{question.name}"></s:textarea>
                    </div>
                    <div>
                        <label  class="label">题目答案 </label>
                        <s:textarea name="answer"  cols="40" rows="5" value="%{question.answer}"></s:textarea>
                    </div>
                    <div>
                        <s:submit value="修改"  id="update"></s:submit>
                        <input type="button" id="submit" onclick="history.back()" value="返回" >
                    </div>
                </s:form>
            </div>
        </div>
    </body>
</html>
